package com.keensense.vcm.model;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

@XmlRootElement(name = "request")
public class OneVOneRequest {

    private OneVOneRequest() {
    }

    public OneVOneRequest(Image image1, Image image2) {
        this.image1 = image1;
        this.image2 = image2;
    }

    @XmlElement
    private String algorithmCode;

    @XmlElement
    private Image image1;

    @XmlElement
    private Image image2;

    public static class Image {
        /**
         * 图片流base64编码。推荐base64值的长度在1M以内，超出推荐值，请求响应时间会增加。
         */
        @XmlElement
        private String base64;
        /**
         * 图片通过上传接口上传后，得到的由系统返回的图片id
         */
        @XmlElement
        private String fileId;

        /**
         * 图片的URL地址
         */
        @XmlElement
        private String url;

        /**
         * 图片的二进制流，暂不支持
         */
        @XmlElement
        private String stream;

        @XmlTransient
        public String getBase64() {
            return base64;
        }

        public void setBase64(String base64) {
            this.base64 = base64;
        }

        @XmlTransient
        public String getFileId() {
            return fileId;
        }

        public void setFileId(String fileId) {
            this.fileId = fileId;
        }

        @XmlTransient
        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        @XmlTransient
        public String getStream() {
            return stream;
        }

        public void setStream(String stream) {
            this.stream = stream;
        }
    }
}
